package edu.jamestang.yeb.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import edu.jamestang.yeb.entity.Department;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @author JamesTang
 * @date 2021/12/16 1:51
 */
@Mapper
public interface DepartmentMapper extends BaseMapper<Department> {


    /**
     * Get all Department
     * @param parentId parentId
     * @return Department list
     */
    List<Department> getAllDepartments(Integer parentId);

    /**
     * Add department
     * @param department dep
     */
    void addDep(Department department);

    /**
     * Delete department
     * @param department department
     */
    void deleteDep(Department department);
}
